<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Docs For Class PdfDocumentExtractor</title>
  <link rel="stylesheet" href="../media/stylesheet.css" />
  <script src="../media/lib/classTree.js"></script>
<link id="webfx-tab-style-sheet" type="text/css" rel="stylesheet" href="../media/lib/tab.webfx.css" />
<script type="text/javascript" src="../media/lib/tabpane.js"></script>
  <script language="javascript" type="text/javascript" src="../media/lib/ua.js"></script>
<script language="javascript" type="text/javascript">
	var imgPlus = new Image();
	var imgMinus = new Image();
	imgPlus.src = "../media/images/plus.gif";
	imgMinus.src = "../media/images/minus.gif";
	
	function showNode(Node){
        switch(navigator.family){
        	case 'nn4':
        		// Nav 4.x code fork...
				var oTable = document.layers["span" + Node];
				var oImg = document.layers["img" + Node];
        		break;
        	case 'ie4':
        		// IE 4/5 code fork...
				var oTable = document.all["span" + Node];
				var oImg = document.all["img" + Node];
        		break;
        	case 'gecko':
        		// Standards Compliant code fork...
				var oTable = document.getElementById("span" + Node);
				var oImg = document.getElementById("img" + Node);
        		break;
        }
		oImg.src = imgMinus.src;
		oTable.style.display = "block";
	}
	
	function hideNode(Node){
        switch(navigator.family){
        	case 'nn4':
        		// Nav 4.x code fork...
				var oTable = document.layers["span" + Node];
				var oImg = document.layers["img" + Node];
        		break;
        	case 'ie4':
        		// IE 4/5 code fork...
				var oTable = document.all["span" + Node];
				var oImg = document.all["img" + Node];
        		break;
        	case 'gecko':
        		// Standards Compliant code fork...
				var oTable = document.getElementById("span" + Node);
				var oImg = document.getElementById("img" + Node);
        		break;
        }
		oImg.src = imgPlus.src;
		oTable.style.display = "none";
	}
	
	function nodeIsVisible(Node){
        switch(navigator.family){
        	case 'nn4':
        		// Nav 4.x code fork...
				var oTable = document.layers["span" + Node];
        		break;
        	case 'ie4':
        		// IE 4/5 code fork...
				var oTable = document.all["span" + Node];
        		break;
        	case 'gecko':
        		// Standards Compliant code fork...
				var oTable = document.getElementById("span" + Node);
        		break;
        }
		return (oTable && oTable.style.display == "block");
	}
	
	function toggleNodeVisibility(Node){
		if (nodeIsVisible(Node)){
			hideNode(Node);
		}else{
			showNode(Node);
		}
	}
</script>
<!-- template designed by Julien Damon based on PHPEdit's generated templates, and tweaked by Greg Beaver -->
<body bgcolor="#ffffff" ><!-- Start of Class Data -->
<h2>
	Class PdfDocumentExtractor
</h2> (line <span class="linenumber">37</span>)
<div class="tab-pane" id="tabPane1">
<script type="text/javascript">
tp1 = new WebFXTabPane( document.getElementById( "tabPane1" ));
</script>

<div class="tab-page" id="Description">
<h2 class="tab">Description</h2>
<pre>
<a href="../lucene-silverstripe-module/ZendSearchLuceneTextExtractor.html">ZendSearchLuceneTextExtractor</a>
   |
   --PdfDocumentExtractor</pre>
<p>
	<b><i>Located in File: <a href="_TextExtractors---PdfDocumentExtractor.php.html">/TextExtractors/PdfDocumentExtractor.php</a></i></b><br>
</p>
<!-- ========== Info from phpDoc block ========= -->
<h5>Extracts text from a PDF document.  Tries to use the pdftotext command-line  utility if it is installed, otherwise falls back to the PDF2Text class.</h5>
<div class="desc"><p>The pdftotext utility gives superior text extraction, and should be used  wherever possible.  It can be found for Windows and Mac OS X at:</p><p><a href="http://www.foolabs.com/xpdf/">http://www.foolabs.com/xpdf/</a></p><p>If you are using Linux, the utility is part of both the xpdf and  poppler-utils packages.  On Ubuntu and Debian:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;apt-get&nbsp;install&nbsp;poppler-utils</div></li>
</ol></div></p><p>The path to the pdftotext binary will be detected automatically if it lives  at /usr/bin/pdftotext or /usr/local/bin/pdftotext.  If your catdoc binary is  in a non-standard place, you can set it in your _ss_environment.php file like  so:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<a href="http://www.php.net/define">define</a><strong>(</strong><font color="#66cccc">'PDFTOTEXT_BINARY_LOCATION'</font><strong>,&nbsp;</strong><font color="#66cccc">'/home/username/bin/pdftotext'</font><strong>)</strong><strong>;</strong></div></li>
</ol></div></p><p>Or, if using _config.php, you can also set it directly on the class:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<a href="../lucene-silverstripe-module/PdfDocumentExtractor.html">PdfDocumentExtractor</a><strong>::</strong><strong>$binary_location&nbsp;</strong>=&nbsp;<font color="#66cccc">'/home/username/bin/pdftotext'</font><strong>;</strong></div></li>
</ol></div></p></div>
<ul>
		<li><strong>author:</strong> - Darren Inwood &lt;<a href="mailto:darren.inwood@chrometoaster.com">darren.inwood@chrometoaster.com</a>&gt;</li>
	</ul>
<br /><hr />
</div>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "Description" ) );</script>
<div class="tab-page" id="tabPage1">

<h2 class="tab">Class Variables</h2>
<!-- ============ VARIABLE DETAIL =========== -->
<strong>Summary:</strong><br />
<div class="var-title">
    static <span class="var-type">mixed</span>
    <a href="#var$binary_location" title="details" class="property"><strong>$binary_location</strong></a>
</div>
<div class="var-title">
    static <span class="var-type">mixed</span>
    <a href="#var$extensions" title="details" class="property"><strong>$extensions</strong></a>
</div>
<hr />
<a name="var$binary_location" id="var$binary_location"><!-- --></A>
<div style="background='#ffffff'">
<h4>
<img src="../media/images/PublicProperty.gif" border="0" /> <strong class="property">static $binary_location</strong> (line <span class="linenumber">52</span>)
 </h4>
<h4>Data type : mixed</h4>
<!-- ========== Info from phpDoc block ========= -->
<h5>Holds the location of the pdftotext binary.  Should be a full filesystem  path.</h5>
<ul>
		<li><strong>access:</strong> - public</li>
	</ul>
</div>
<a name="var$extensions" id="var$extensions"><!-- --></A>
<div style="background='#eeeeee'">
<h4>
<img src="../media/images/PublicProperty.gif" border="0" /> <strong class="property">static $extensions = array(<br />        'pdf'<br />    )</strong> (line <span class="linenumber">43</span>)
 </h4>
<h4>Data type : mixed</h4>
<p><strong>Overrides:</strong> Array<br></p><!-- ========== Info from phpDoc block ========= -->
<h5>The extensions that can be handled by this text extractor.</h5>
<ul>
		<li><strong>access:</strong> - public</li>
	</ul>
</div>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage1" ) );</script>
</div>
<div class="tab-page" id="constantsTabpage">

<h2 class="tab">Class Constants</h2>
<!-- ============ VARIABLE DETAIL =========== -->
<strong>Summary:</strong><br />
<hr />
<script type="text/javascript">tp1.addTabPage( document.getElementById( "constantsTabpage" ) );</script>
</div>
<div class="tab-page" id="tabPage2">
<h2 class="tab">Method Detail</h2>
<!-- ============ METHOD DETAIL =========== -->
<strong>Summary:</strong><br />
<div class="method-summary">
    <div class="method-definition">
    static         <span class="method-result">void</span>
        <a href="#methodcommandline" title="details" class="method-name">commandline</a>
        (<span class="var-type"></span>&nbsp;<span class="var-name">$filename</span>)
        </div>
    <div class="method-definition">
    static         <span class="method-result">String</span>
        <a href="#methodextract" title="details" class="method-name">extract</a>
        (<span class="var-type">String</span>&nbsp;<span class="var-name">$filename</span>)
        </div>
    <div class="method-definition">
    static         <span class="method-result">String|Boolean</span>
        <a href="#methodget_binary_path" title="details" class="method-name">get_binary_path</a>
        ()
        </div>
    <div class="method-definition">
    static         <span class="method-result">void</span>
        <a href="#methodpdf2text" title="details" class="method-name">pdf2text</a>
        (<span class="var-type"></span>&nbsp;<span class="var-name">$filename</span>)
        </div>
</div>
<hr />
<A NAME='method_detail'></A>


<a name="methodcommandline" id="methodcommandline"><!-- --></a>
<div style="background='#ffffff'"><h4>
<img src="../media/images/PublicMethod.gif" border="0" /> <strong class="method">Static Method commandline</strong> (line <span class="linenumber">72</span>)
 </h4> 
<h4><i>void</i> <strong>commandline(

$filename)</strong></h4>

	<!-- ========== Info from phpDoc block ========= -->
		<h4>Parameters</h4>
	<ul>
			<li><strong> $filename</strong>: </li>
		</ul>
		
	<h4>Info</h4>
	<ul>
			<li><strong>access</strong> - protected</li>
		</ul>
</div>
<a name="methodextract" id="methodextract"><!-- --></a>
<div style="background='#eeeeee'"><h4>
<img src="../media/images/PublicMethod.gif" border="0" /> <strong class="method">Static Method extract</strong> (line <span class="linenumber">60</span>)
 </h4> 
<h4><i>String</i> <strong>extract(
String
$filename)</strong></h4>

<p><strong>Overrides :</strong> <a href="../lucene-silverstripe-module/ZendSearchLuceneTextExtractor.html#methodextract">ZendSearchLuceneTextExtractor::extract()</a> Returns text for a given full filesystem path.  If a file cannot be  processed, you should return an empty string.</p>
	<!-- ========== Info from phpDoc block ========= -->
<h5>Returns a string containing the text in the given TXT document.</h5>
		<h4>Parameters</h4>
	<ul>
			<li><strong>String $filename</strong>: Full filesystem path to the file to process.</li>
		</ul>
		
	<h4>Info</h4>
	<ul>
			<li><strong>return</strong> - Text extracted from the file.</li>
			<li><strong>access</strong> - public</li>
		</ul>
</div>
<a name="methodget_binary_path" id="methodget_binary_path"><!-- --></a>
<div style="background='#ffffff'"><h4>
<img src="../media/images/PublicMethod.gif" border="0" /> <strong class="method">Static Method get_binary_path</strong> (line <span class="linenumber">102</span>)
 </h4> 
<h4><i>String|Boolean</i> <strong>get_binary_path(
)</strong></h4>

	<!-- ========== Info from phpDoc block ========= -->
<h5>Try to detect where the pdftptext binary has been installed.</h5>
		
	<h4>Info</h4>
	<ul>
			<li><strong>return</strong> - Returns the path to the pdftotext binary, or                           boolean false if it cannot be found.</li>
			<li><strong>access</strong> - protected</li>
		</ul>
</div>
<a name="methodpdf2text" id="methodpdf2text"><!-- --></a>
<div style="background='#eeeeee'"><h4>
<img src="../media/images/PublicMethod.gif" border="0" /> <strong class="method">Static Method pdf2text</strong> (line <span class="linenumber">81</span>)
 </h4> 
<h4><i>void</i> <strong>pdf2text(

$filename)</strong></h4>

	<!-- ========== Info from phpDoc block ========= -->
		<h4>Parameters</h4>
	<ul>
			<li><strong> $filename</strong>: </li>
		</ul>
		
	<h4>Info</h4>
	<ul>
			<li><strong>access</strong> - protected</li>
		</ul>
</div>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage2" ) );</script></div>
<div class="tab-page" id="iVars">
<h2 class="tab">Inherited Variables</h2>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "iVars" ) );</script>
<!-- =========== VAR INHERITED SUMMARY =========== -->
<A NAME='var_inherited_summary'><!-- --></A>
<h3>Inherited Class Variable Summary</h3>

		<!-- =========== Summary =========== -->
	<h4>Inherited From Class <a href="../lucene-silverstripe-module/ZendSearchLuceneTextExtractor.html">ZendSearchLuceneTextExtractor</a></h4>
		<h4>
<img src="../media/images/PublicProperty.gif" border="0" /><strong class="property"> <a href="../lucene-silverstripe-module/ZendSearchLuceneTextExtractor.html#var$priority">ZendSearchLuceneTextExtractor::$priority</a></strong> - Controls the order in which text extractor classes are tried for a  specific file extension.  Default is 100.  To make your custom extractor  run before an inbuilt one, set this to less than 100, or to make it run  afterwards set it to more than 100.
	</h4> 
		</div>
<div class="tab-page" id="iMethods">
<h2 class="tab">Inherited Methods</h2>
<script type="text/javascript">tp1.addTabPage( document.getElementById( "iMethods" ) );</script>
<!-- =========== INHERITED METHOD SUMMARY =========== -->
<A NAME='functions_inherited'><!-- --></A>
<h3>Inherited Method Summary</h3>

		<!-- =========== Summary =========== -->
	<h4>Inherited From Class <a href="../lucene-silverstripe-module/ZendSearchLuceneTextExtractor.html">ZendSearchLuceneTextExtractor</a></h4>
				<h4>
<img src="../media/images/PublicMethod.gif" border="0" /><strong class="method"> <a href="../lucene-silverstripe-module/ZendSearchLuceneTextExtractor.html#methodextract">ZendSearchLuceneTextExtractor::extract()</a></strong> - Returns text for a given full filesystem path.  If a file cannot be  processed, you should return an empty string.
		</h4> 

				<br />
	</div>
</div>
<script type="text/javascript">
//<![CDATA[

setupAllTabs();

//]]>
</script>
	<div id="credit">
		<hr />
		Documentation generated on Wed, 06 Apr 2011 14:30:27 +1200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</div>
</body>
</html>